<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改账户管理器')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-account-edit" th:object="${metaAccount}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">说明：</label>
                <div class="col-sm-8">
                    <input name="remark" th:field="*{remark}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">账户归属：</label>
                <div class="col-sm-8">
                    <input name="accountHolder" th:field="*{accountHolder}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">名称：</label>
                <div class="col-sm-8">
                    <input name="accountName" th:field="*{accountName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">账户：</label>
                <div class="col-sm-8">
                    <input name="loginAccount" th:field="*{loginAccount}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">密码：</label>
                <div class="col-sm-8">
                    <input name="loginPassword" th:field="*{loginPassword}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">支付密码：</label>
                <div class="col-sm-8">
                    <input name="payPassword" th:field="*{payPassword}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">私密密码：</label>
                <div class="col-sm-8">
                    <input name="privatePassword" th:field="*{privatePassword}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">服务密码：</label>
                <div class="col-sm-8">
                    <input name="servicePassword" th:field="*{servicePassword}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">绑定手机：</label>
                <div class="col-sm-8">
                    <input name="bindPhoneNumber" th:field="*{bindPhoneNumber}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">绑定邮箱：</label>
                <div class="col-sm-8">
                    <input name="bindEmail" th:field="*{bindEmail}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">绑定微信：</label>
                <div class="col-sm-8">
                    <input name="bindWechat" th:field="*{bindWechat}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">补充说明：</label>
                <div class="col-sm-8">
                    <textarea name="historyInfo" class="form-control">[[*{historyInfo}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">账户类型：</label>
                <div class="col-sm-8">
                    <select name="accountType" class="form-control m-b" th:with="type=${@dict.getType('wretchant_account_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{accountType}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">登陆地址：</label>
                <div class="col-sm-8">
                    <input name="loginUrl" th:field="*{loginUrl}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "wretchant/account";
        $("#form-account-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-account-edit').serialize());
            }
        }
    </script>
</body>
</html>